Fix http://llvm.org/bugs/show_bug.cgi?id=11428. Fix provided by Alberto Ganesh Barbati git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145698 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/system_error b/include/system_error index c9a8097..971be33 100644 --- a/include/system_error +++ b/include/system_error
@@ -245,9 +245,8 @@ // for them: //enum class errc -struct errc +_LIBCPP_DECLARE_STRONG_ENUM(errc) { -enum _ { address_family_not_supported = EAFNOSUPPORT, address_in_use = EADDRINUSE, address_not_available = EADDRNOTAVAIL, @@ -343,23 +342,17 @@ value_too_large = EOVERFLOW, wrong_protocol_type = EPROTOTYPE }; - - _ __v_; - - _LIBCPP_ALWAYS_INLINE - errc(_ __v) : __v_(__v) {} - _LIBCPP_ALWAYS_INLINE - operator int() const {return __v_;} - -}; +_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(errc) template <> struct _LIBCPP_VISIBLE is_error_condition_enum<errc> : true_type { }; +#ifdef _LIBCPP_HAS_NO_STRONG_ENUMS template <> struct _LIBCPP_VISIBLE is_error_condition_enum<errc::_> : true_type { }; +#endif class error_condition; class error_code;